home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global objlist, objfglist
- set temp to 1
- set rightcards to [0, 0]
- set cardspoint to 0
- repeat with i = 1 to 24
- set thisobj to getAt(objlist, i)
- if (the myside of thisobj = 1) and (getAt(objfglist, i) = 1) then
- setAt(rightcards, temp, thisobj)
- set temp to temp + 1
- end if
- end repeat
- if the myphoto of getAt(rightcards, 1) = the myphoto of getAt(rightcards, 2) then
- remove(getAt(rightcards, 1))
- remove(getAt(rightcards, 2))
- repeat with i = 1 to 24
- set cardspoint to cardspoint + getAt(objfglist, i)
- end repeat
- if cardspoint = 0 then
- go("clear_game")
- else
- go("bingo")
- end if
- else
- repeat with i = 30 to 35
- if getAt(missmarklist, i - 29) = 0 then
- set the visible of sprite i to 1
- setAt(missmarklist, i - 29, 1)
- exit repeat
- end if
- end repeat
- set misstimes to 0
- repeat with i = 30 to 35
- set misstimes to misstimes + getAt(missmarklist, i - 29)
- end repeat
- if misstimes = 7 then
- puppetSound("miss.AIF")
- go("try_again")
- else
- puppetSound("miss.AIF")
- go("clear_card")
- end if
- end if
- end
-